/**
 * 考勤 api 封装
 *
 * @Author:    wy
 * @Date:      2024-09-25 17:09:55
 * @Copyright  <a href="https://1024lab.net">1024创新实验室</a>
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const attendanceApi = {
  /**
   * 分页查询  @author  wy
   */
  queryPage: (param) => {
    return postRequest('/attendance/queryPage', param);
  },

  /**
   * 增加  @author  wy
   */
  add: (param) => {
    return postRequest('/attendance/add', param);
  },

  /**
   * 修改  @author  wy
   */
  update: (param) => {
    return postRequest('/attendance/update', param);
  },

  /**
   * 删除  @author  wy
   */
  delete: (id) => {
    return getRequest(`/attendance/delete/${id}`);
  },

  /**
   * 批量删除  @author  wy
   */
  batchDelete: (idList) => {
    return postRequest('/attendance/batchDelete', idList);
  },

  /**
   * 分页查询  @author  wy
   */
  queryData: (param) => {
    return postRequest('/attendance/queryData', param);
  },

  /**
   * 左侧统计查询  @author  wy
   */
  queryResult: (param) => {
    return postRequest('/attendance/queryResult', param);
  },
};
